package com.admin.kotlintest.adapter

import android.content.Context
import com.admin.kotlintest.R
import com.admin.kotlintest.base.AdapterHolder
import com.admin.kotlintest.base.CurrencyAdapter
import com.admin.kotlintest.bean.Funcation
import com.admin.kotlintest.utils.ImageUtils
import com.socks.library.KLog

/**
 * Created by 吴昶 on 2018/4/11.
 */
class FunctionAdapter(context: Context, layoutId: Int, data: MutableList<Funcation>?) :CurrencyAdapter<Funcation>(context, layoutId, data){

    override fun convert(holder: AdapterHolder, item: Funcation, position: Int) {
        ImageUtils.GlideLoadImage(context,item.imgUrl!!.fileUrl,holder.getImageView(R.id.iv_function), R.mipmap.ic_launcher,R.mipmap.ic_launcher)
        holder.setTextViewText(R.id.tv_function,item.funcationName)
    }

}